package models

import (
	"time"
	"github.com/astaxie/beego/orm"
)

type DeviceMessages struct {
	Id                 int64
	DeviceMessagesTime time.Time `ht:"list;name(消息时间)"`
	DeviceId           int        `ht:"list;name(设备Id)"`
	DeviceType         int        `ht:"name(设备类型);subclass([{\"Num\":1,\"Name\":\"烟雾传感器\"},{\"Num\":2,\"Name\":\"可燃气\"},{\"Num\":3,\"Name\":\"热成像\"},{\"Num\":4,\"Name\":\"节点电压\"},{\"Num\":5,\"Name\":\"温度监控\"},{\"Num\":6,\"Name\":\"消防用水\"},{\"Num\":7,\"Name\":\"边界入侵\"}])"`
	Data               string        `ht:"list;name(设备数据)"`
}

func init() {
	orm.RegisterModel(new(DeviceMessages))
}
func (*DeviceMessages)TableName() string {
	return "device_messages"
}

func (*DeviceMessages) FN_Id() string {
	return "Id"
}
func (*DeviceMessages) FN_DeviceMessagesTime() string {
	return "DeviceMessagesTime"
}
func (*DeviceMessages) FN_DeviceId() string {
	return "DeviceId"
}
func (*DeviceMessages) FN_DeviceType() string {
	return "DeviceType"
}
func (*DeviceMessages) FN_Data() string {
	return "Data"
}